2 using System
.Collections
.Generic
;
6 using System
.Windows
.Controls
;
7 using System
.Windows
.Data
;
8 using System
.Windows
.Documents
;
9 using System
.Windows
.Input
;
10 using System
.Windows
.Media
;
11 using System
.Windows
.Media
.Imaging
;
12 using System
.Windows
.Shapes
;
13 using System
.Windows
.Navigation
;
15 namespace CSWPFNavigationUsage
17 public partial class MainPage
: Page
21 InitializeComponent();
24 private void OnHyperlink(object sender
, RoutedEventArgs e
)
26 this.NavigationService
.Navigate(new Uri("Page1.xaml", UriKind
.Relative
));
29 private void OnNavagateToObject(object sender
, RoutedEventArgs e
)
31 MyDummy obj
= new MyDummy() { Property1 = "Hello", Property2 = "everyone" }
;
32 this.NavigationService
.Navigate(obj
);
35 private void OnNavagateToPage(object sender
, RoutedEventArgs e
)
37 this.NavigationService
.Navigate(new Uri("FramePage.xaml", UriKind
.Relative
));
43 public string Property1 { get; set; }
44 public string Property2 { get; set; }